package com.zy.utils;

/**
 * 判断上传的文件是否是图片格式
 * @author 梅文军
 *
 */
public final class ImageTypeUtil {
	
	public static boolean isImage(String upload)
	{
		String fileName=upload.toLowerCase();
		if(fileName.endsWith(".jpg")||fileName.endsWith(".jpeg")||fileName.endsWith(".bmp")||fileName.endsWith(".gif")||fileName.endsWith("png"))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}	
